package com.ruoyi.cms.domain.bo;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 文章业务对象 cms_article
 *
 * @author guorui
 * @date 2023-11-08
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class CmsArticleBo extends BaseEntity {

    /**
     * 
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 所属分类
     */
    @NotNull(message = "所属分类不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long cateId;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 摘要
     */
    private String remark;

    /**
     * 缩略图:附件id
     */
    @NotNull(message = "缩略图:附件id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long thumb;

    /**
     * 是否原创:1是,0否
     */
    @NotNull(message = "是否原创:1是,0否不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer original;

    /**
     * 来源或作者
     */
    @NotBlank(message = "来源或作者不能为空", groups = { AddGroup.class, EditGroup.class })
    private String origin;

    /**
     * 来源地址
     */
    @NotBlank(message = "来源地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String originUrl;

    /**
     * 内容
     */
    @NotBlank(message = "内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * markdown内容
     */
    @NotBlank(message = "markdown内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mdContent;

    /**
     * 阅读量
     */
    @NotNull(message = "阅读量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long read;

    /**
     * 属性:1精华,2热门,3推荐
     */
    @NotNull(message = "属性:1精华,2热门,3推荐不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer type;

    /**
     * 是否首页显示:0否,1是
     */
    @NotNull(message = "是否首页显示", groups = { AddGroup.class, EditGroup.class })
    private String recommend;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sort;

    /**
     * 状态:1正常,0下架
     */
    @NotNull(message = "状态:1正常,0下架不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    /**
     * 审核状态
     */
    private String approveStatus;
    /**
     * 发布时间
     */
    private Date publishTime;
    /**
     * 发布者
     */
    private String publishUser;
    /**
     * 开始时间
     */
    private Date startDate;
    /**
     * 结束时间
     */
    private Date endDate;
    
}
